package cn.edu.dlut.port.isp.bean.teach.simulation;
/**
 *
 * @author tangguolei
 */
public class BerthBean {

    public static int GENERALCARGO = 1;
    public static int IMPORTBULK = 2;
    public static int EXPORTBULK = 3;
    public static int IMPORTOIL = 4;
    public static int EXPORTOIL = 5;
    public static int CONTAINER = 6;
    public static int BULKFREIGHTER = 7;
    public static int OILCARRIER = 8;
    public static String GENERALCARGOBERTH = "GENCARGO";
    public static String IMPORTBULKBERTH = "BULK_IMP";
    public static String EXPORTBULKBERTH = "BULK_EXP";
    public static String IMPORTOILBERTH = "OIL_IMP";
    public static String EXPORTOILBERTH = "OIL_EXP";
    public static String CONTAINERBERTH = "CONTAINER";
    public static String GENERALCARGOBERTHCN = "件杂货";
    public static String IMPORTBULKBERTHCN = "进口干散货";
    public static String EXPORTBULKBERTHCN = "出口干散货";
    public static String IMPORTOILBERTHCN = "进口油品";
    public static String EXPORTOILBERTHCN = "出口油品";
    public static String CONTAINERBERTHCN = "集装箱";
    private int cargoTypeInt;
    private String cargoType;
    private int tonnage;
    private int number;

    private String getCargoTypeCN(int type) {
        switch (type) {
            case 1:
                return GENERALCARGOBERTHCN.toString();
            case 2:
                return IMPORTBULKBERTHCN.toString();
            case 3:
                return EXPORTBULKBERTHCN.toString();
            case 4:
                return IMPORTOILBERTHCN.toString();
            case 5:
                return EXPORTOILBERTHCN.toString();
            default:
                return CONTAINERBERTHCN.toString();
        }
    }

    public String getCargoType() {
        return cargoType;
    }

    public void setCargoType(String cargoType) {
        this.cargoType = cargoType;
    }

    public void setCargoType(int cargoType) {
        this.cargoTypeInt = cargoType;
        this.cargoType = getCargoTypeCN(cargoType);
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getTonnage() {
        return tonnage;
    }

    public void setTonnage(int tonnage) {
        this.tonnage = tonnage;
    }

    public int getCargoTypeInt() {
        return cargoTypeInt;
    }

    public void setCargoTypeInt(int cargoTypeInt) {
        this.cargoTypeInt = cargoTypeInt;
    }

	@Override
	public String toString() {
		return "BerthBean [cargoTypeInt=" + cargoTypeInt + ", cargoType=" + cargoType + ", tonnage=" + tonnage
				+ ", number=" + number + "]";
	}
    
    
}
